package MiniZelda;

public class Intel {
Main main;
Mouse mouse;
Keyboard k;
int x = 5, y = 5;
private Render rend;
	
	public Intel(Render r) {
		this.rend = r;
		
	}
	
	public void process(Keyboard ke) {
		this.k = ke;
		if(k.d || k.l || k.u || k.r )
			handleKey();
		
	}
	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}

	public void handleKey() {
		if(k.d && y < 527) 
			y += 10;
		if(k.u && y > 13)
			y -= 10;
		if(k.l && x > 13)
			x -= 10;
		if(k.r && x < 737)
			x += 10;
		System.out.println(x + " : " + y);
	}

}
